//标签相关接口
import request from '@/utils/request'
import type {
  DeleteRequest,
  CommentAddRequest,
  CommentQueryRequest,
  CommentUpdateRequest,
  PageComment,
} from './type'
//项目用户相关的请求地址
enum API {
  LIST_URL = '/admin/comment/list',
  DELETE_URL = '/admin/comment/delete',
  ADD_URL = '/admin/comment/add',
  UPDATE_URL = '/admin/comment/update',
  DELETE_BATCH_URL = '/admin/comment/deleteBatch',
}

//获取标签列表接口
export const reqList = (data: CommentQueryRequest) =>
  request.post<any, PageComment>(API.LIST_URL, data)

//删除标签接口
export const reqDelete = (data: DeleteRequest) =>
  request.post<any, any>(API.DELETE_URL, data)

//新增标签接口
export const reqAdd = (data: CommentAddRequest) =>
  request.post<any, any>(API.ADD_URL, data)

//修改标签接口
export const reqUpdate = (data: CommentUpdateRequest) =>
  request.post<any, any>(API.UPDATE_URL, data)

export const reqDeleteBatch = (ids: any) =>
  request.post<any, any>(API.DELETE_BATCH_URL, { ids: ids })
